cmake_minimum_required(VERSION 3.16)

# Render module
add_library(render
    glwidget.h
    glwidget.cpp
    softwarewidget.h
    softwarewidget.cpp
    multiscreenwidget.h
    multiscreenwidget.cpp
)

target_link_libraries(render 
    Qt6::Core
    Qt6::Widgets
    Qt6::OpenGL
    core
)

target_include_directories(render PUBLIC 
    ${CMAKE_CURRENT_SOURCE_DIR}
)

# Compiler-specific options for OpenGL
if(WIN32)
    target_link_libraries(render OpenGL32)
elseif(UNIX AND NOT APPLE)
    target_link_libraries(render GL)
endif()